@import "~taro-ui/dist/style/components/icon.scss";

.home{
  background: var(--page-bg);
  min-height: 100vh;
  .home-nav-bar{
    background: var(--theme-color);
    color: #fff;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    .box-flex{
      padding: 0 24px;
      align-items: center;
      font-size: 30px;
      font-weight: 700;
      line-height: 64px;
    }
  } //  home-nav-bar end

  .home-main{
    padding: 24px;
    position: relative;
    &::before{
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 340px;
      display: block;
      content: '';
      background: linear-gradient(var(--theme-color),#fff);
    }
    .main-swiper{
      height: 200px;
      .swiper-img{
        width: 100%;
        height: 200px;
        border-radius: 12px;
      }
    }
    .main-goods{
      position: relative;
      z-index: 1;
      margin: 24px 0;
      padding: 24px 16px;
      padding-right: 0;
      background: #fff;
      border-radius: 20px;
      .goods-title{
        display: flex;
        color: #8E9094;
        align-items: center;
        font-size: 28px;
        margin-right: 16px;
        .title-h2{
          color: #1D2129;
          font-weight: 700;
          font-size: 32px;
          margin-right: auto;
        }
      }
      .goods-list{
        display: flex;
        margin: 24px 0 0;
        overflow-x: auto;
        .list-item{
          flex-shrink: 0;
          width: 152px;
          margin-right: 16px;
          .item-img{
            position: relative;
            border-radius: 12px;
            overflow: hidden;
            margin-bottom: 16px;
            .img-icon{
              position: absolute;
              left: 6px;
              top: 0;
              view{
                font-size: 16px;
                color: #fff;
                background: rgba(0,0,0,.8);
                margin-top: 6px;
                padding: 4px;
                border-radius: 6px;
              }
            }
            .img{
              width: 100%;
              height: 208px;
              display: block;
              border-radius: 12px;
            }
            .img-footer{
              position: absolute;
              bottom: 0;
              left: 0;
              right: 0;
              background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.54) 53.54%, rgba(0, 0, 0, 0.8) 100%);
              color: #fff;
              font-size: 20px;
              padding: 12px;
            }
          }
          .item-h2{
            font-size: 28px;
            font-weight: 700;
          }
          .item-span{
            font-size: 20px;
            color: #A5A6A9;
          }
          .item-button{
            font-size: 24px;
            color: #fff;
            width: 104px;
            text-align: center;
            padding: 16px 0;
            margin-top: 16px;
            border-radius: 100px;
            background: var(--theme-color);
            line-height: 1;
            border: 1px solid transparent;
            &.favorites{
              background: var(--sub-theme);
            }
            &.already_favorites{
              background: #fff;
              color: #4A4D54;
              border-color: #4A4D54;
            }
          }
        }
      }
    }  // main-goods end

    .main-welfare{
      display: flex;
      align-items: center;
      background: linear-gradient(90deg, #F89539 -18.8%, #F65F25 87.33%);
      border-radius: 18px;
      padding: 7px;
      position: relative;
      .welfare-info{
        width: 100%;
        font-size: 24px;
        color: #303133;
        margin-right: auto;
        line-height: 80px;
        background: #fff;
        border-radius: 18px;
        padding: 0 24px;
      }
    } ///  main-welfare end

    .main-banner{
      height: 158px;
      .banner-img{
        width: 100%;
        height: 158px;
        border-radius: 20px;
      }
    }  //  main-banner end 

    .main-list{
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      margin: 24px 0;
      .list-title{
        flex-basis: 100%;
        font-size: 32px;
        font-weight: 700;
        color: #1D2129;
        padding-top: 12px;
      }
      .list-item{
        width: 344px;
        margin-top: 24px;
        border-radius: 20px;
        overflow: hidden;
        .item-img{
          width: 100%;
          height: 384px;
          display: block;
        }
        .item-h2{
          width: 100%;
          font-size: 28px;
          margin-bottom: 20px;
        }
        .item-info{
          display: flex;
          align-items: center;
          justify-content: space-between;
          font-size: 24px;
          color: #A5A6A9;
          .info-price{
            color: #f73;
            font-size: 36px;
            font-weight: 700;
          }
        }
      }
    }
  } //  home-main end

  .home-modal{
    display: flex;
    flex-direction: column;
    align-items: center;
    .modal-img{
      width: 600px;
      display: block;
      margin-bottom: 100px;
    }
    .at-icon{
      font-size: 64px;
      color: #fff;
    }
  }
  .at-modal__container{
    background-color: transparent;
  }
}